#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2020/6/22 0022 14:37
# @Author  : wzy
# @Site    : 
# @File    : run_case_ddt_main.py
# @Software: PyCharm

from Util.operate_pathUrll import pathinfo
import Base.HTMLTestRunner as HTMLTestRunner
import unittest
case_path = pathinfo.get_project_baseUrl() + "/Run"
report_path = pathinfo.get_project_baseUrl() + "/Report/report.HTML"
caseLlist = pathinfo.get_project_baseUrl() + "/UnittestCase"

if __name__ == '__main__':
    #  DDT 包含数据依赖的runmain
    discover = unittest.defaultTestLoader.discover(case_path, pattern="run_case_*.py",top_level_dir=None)
    with open(report_path, "wb") as f:
        runner = HTMLTestRunner.HTMLTestRunner(stream=f, title="wzycs", description="this is test report")
        runner.run(discover)